package app.netant.book.bookbao99;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class BookBao99Root extends BaseRoot {
	
	public BookBao99Root(){
		this.homeUrl = "https://www.bookbao99.net/booklist-p_3-c_0-t_0-o_0.html";
		this.pageUrl = "https://www.bookbao99.net/booklist-p_";
		this.tableKey = "bookbao99";
	}

	@Override
	public String buildUrl(int pageIdx) {
		return this.pageUrl + pageIdx+"-c_0-t_0-o_0.html";
	}

	@Override
	public BasePage buildPage(String url) {
		return new BookBao99Page(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new BookBao99Detail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new BookBao99Entity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		BookBao99Root root = new BookBao99Root();
		root.analyse(16338);
		//root.excepCycle();
	}


	
}
